gdk: Fix toplevel calculation on pointer grab switch
authorCarlos Garnacho <carlosg@gnome.org>
Fri, 31 Jul 2020 16:46:47 +0000 (18:46 +0200)
committerCarlos Garnacho <carlosg@gnome.org>
Fri, 31 Jul 2020 16:53:01 +0000 (18:53 +0200)
commit9564cba4928f9fb7bf3b6dc1ed275e9ad617adf8
tree943cd7cee1977fa936e280dd76e2cb856cb5f99e
parent90eec6734fbe11ea50cfafbccb27e6d643a9a08c
gdk: Fix toplevel calculation on pointer grab switch

This check used to read if (grab || device_type != GDK_DEVICE_TYPE_PHYSICAL),
the grab check was only reserved to physical devices, which the current
pointer device definitely doesn't act like. So the condition was "fixed" the
wrong way around, and the latter check is now moot, so the condition should
really go away. We always want to check the new toplevel under the pointer
here.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/2970
gdk/gdkdisplay.c